home *** CD-ROM | disk | FTP | other *** search
/ Power Tools 1993 November - Disc 1 / Power Tools Plus (Disc 1 of 2)(November 1993)(HP).iso / wkst / clrcswpp / clrcswpp.txt < prev   
Text File  |  1992-06-04  |  27KB  |  445 lines

  1. HP/ClearCase
  2. White Paper
  3.  
  4. This document presents an overview of HP/ClearCase. It presents the 
  5. central concepts in the product and an "executive summary" of the 
  6. product's features.
  7.  
  8. Introduction to HP/ClearCase
  9. HP/ClearCase(TM) is a UNIX software engineering toolset for version 
  10. control, configuration management, and process control.
  11.    HP/ClearCase is designed for large-scale and long-lived software 
  12. development projects. The architecture of HP/ClearCase is aimed at 
  13. providing these capabilities without changing the way a current 
  14. engineering environment works. It is targeted at teams of developers 
  15. working in a UNIX local area network. Versions of HP/ClearCase 
  16. running on different hardware platforms are fully compatible.
  17.    HP/ClearCase manages multiple versions of evolving software, 
  18. tracks which versions were used in software builds, performs builds 
  19. and re-builds of individual programs or entire releases according to 
  20. user-defined version specifications, and enforces project-defined 
  21. development policies.
  22.    These capabilities allow HP/ClearCase to address critical 
  23. requirements of organizations that produce and release software:
  24. o Effective Development. HP/ClearCase enables developers to work 
  25.   ficiently as a team, allowing them to fine-tune the balance between 
  26.   sharing each others' work and isolating themselves from destabilizing 
  27.   changes. HP/ClearCase automatically manages the sharing of both 
  28.   source files and "derived" files (object modules, executables).
  29. o Effective Management. HP/ClearCase provides complete tracking of 
  30.   the software build process, so that managers can determine what was 
  31.   built, and how it was built. Further, HP/ClearCase can instantly 
  32.   recreate the source base from which a software system was built, 
  33.   allowing it to be rebuilt, debugged, and updated -- all without 
  34.   interfering with other programming work.
  35. o Enforcement of Development Policies. HP/ClearCase enables project 
  36.   administrators to define development policies and procedures, and 
  37.   automates their enforcement.
  38.  
  39. HP/ClearCase Feature Summary
  40. o Enhanced Version Control. HP/ClearCase includes a version-control 
  41.   system that supports versioning of all file system objects: files, 
  42.   directories, and links. Any type of file can be versioned, including 
  43.   executables, bitmaps, and other non-ASCII files. Versions of 
  44.   directories record the evolution of the organization of the source 
  45.   base: renaming of source files, creation of new source files, and so 
  46.   on
  47. o Transparent Access to Versions. Each versioned object appears to be 
  48.   an ordinary file or directory. No special command, such as SCCS's 
  49.   get, is required to access individual versions.
  50. o Configuration Management: Complete Build Auditing. HP/ClearCase 
  51.   produces build audits called configuration records, which provide 
  52.   complete "bill-of-materials" documentation of software builds. Each 
  53.   configuration record includes a listing of all source file versions 
  54.   that were used and all build options that were specified. Special 
  55.   commands compare configuration records, showing the differences 
  56.   between two builds of the same program.
  57. o Configuration Management: Rule-Based, Dynamic Version Selection. 
  58.   Users can create and use any number of views, each of which selects a 
  59.   particular configuration of source versions. Views are defined by 
  60.   configuration specs consisting of a few powerful, general rules -- 
  61.   there is no need to specify hundreds or thousands of source versions 
  62.   individually. Views are dynamic -- HP/ClearCase continually updates a 
  63.   source configuration by reevaluating the rules that define it. Newly-
  64.   created versions can thus be incorporated into a view automatically 
  65.   and instantly.
  66. o Make-Compatible Software Building. Software build procedures are 
  67.   captured in standard UNIX makefiles. Developers can use any build 
  68.   tools, including make, to build software from HP/ClearCase-maintained 
  69.   sources.
  70. o Build Tool Enhancements. HP/ClearCase's clearmake utility provides 
  71.   several optimizations, including the build auditing capability 
  72.   described above. Whenever possible, clearmake causes derived objects 
  73.   produced by builds to be shared among views. This eliminates the cost 
  74.   -- both in disk storage and in processor usage -- of creating 
  75.   additional, redundant instances of the objects. clearmake can execute 
  76.   several build scripts in parallel, on different hosts in the local 
  77.   area network.
  78. o Guaranteed Rebuildability. A view's configuration spec can be 
  79.   defined in terms of the configuration records produced by previous 
  80.   builds. The exact source base for an individual program or an entire 
  81.   release can be recreated instantly in a new view, thus guaranteeing 
  82.   rebuildability.
  83. o Additional Development Tools. HP/ClearCase supplements UNIX's rich 
  84.   development toolset with a multi-file text-comparison utility and a 
  85.   multi-file text-merge utility. These tools greatly improve efficiency 
  86.   in environments where several variants of a program are being 
  87.   developed concurrently.
  88. o Conservation, Distribution, and Scaling of Resources. HP/ClearCase 
  89.   minimizes data duplication, both for source files (elements) and for 
  90.   build targets (derived objects). A source file version is copied only 
  91.   when a developer wishes to edit it. If a build script would create a 
  92.   redundant copy of an object module or executable, HP/ClearCase 
  93.   instead creates a link to an existing instance.
  94.  
  95. Architecture
  96. Versions of text files are stored efficiently as "deltas", much like 
  97. SCCS or RCS versions. Versions of non-text files can also be stored 
  98. efficiently, using data compression.
  99.    Source data is stored in mountable filesystems, called versioned 
  100. object bases (VOBs). VOBs can be physically located throughout the 
  101. local area network, and mounted on some or all workstations. Further, 
  102. the data storage for an individual VOB can be distributed across the 
  103. network, even to hosts that are not running HP/ClearCase software.
  104.    HP/ClearCase's client-server architecture optimizes usage of 
  105. network resources and provides scalability. Typically, VOBs 
  106. containing shared data (and associated server processes) are located 
  107. on high-speed network server hosts. Developers and their views are 
  108. hosted on individual workstations. As additional developers (and 
  109. their workstations) are added to a project, more compute and storage 
  110. resources become available for HP/ClearCase usage.
  111.  
  112. Version Control
  113. Information in the software development environment is constantly 
  114. being changed. The changes are motivated by shifting requirements and 
  115. the general need for improvement and software maintenance. Older 
  116. versions of the software development elements are needed to recreate 
  117. complete versions of working software previously used. Newer versions 
  118. of these elements are necessary to both back-out of mistakenly 
  119. followed development paths, and to allow members of a development 
  120. team to avoid constantly shifting sand by select an individual 
  121. version of a software component to use even while additional new 
  122. versions are being created.
  123.    Source control systems, such as SCCS and RCS, capture the changes 
  124. made to text files by providing a facility to efficiently store new 
  125. versions and to maintain the evolutionary relationships among them. 
  126. These, and similar systems also provide version annotation facilities 
  127. that support a change audit trail (i.e. who did what when and why) 
  128. and allow the attachment of easily understood labels (e.g RLS_2.1) to 
  129. mark individual versions for later retrieval.
  130.    Version control systems use explicit commands to create new file 
  131. version trees, to add branches to these trees, and to add versions to 
  132. the branches. Such commands (e.g. check-out, check-in) regulate the 
  133. growth of the version trees, arbitrate conflicting parallel 
  134. developments, and help collect the information included in the change 
  135. history.
  136.   Even in modest size projects, the version tree of a source code 
  137. file can readily grow to include many versions on several separate 
  138. development branches.
  139.    HP/ClearCase, like SCCS and RCS, can maintain many versions of 
  140. each source file. Unlike other systems, HP/ClearCase can also 
  141. maintain versions of directories. All version-controlled data is 
  142. stored in mountable filesystems, called versioned object bases 
  143. (VOBs). A VOB is a network-wide resource -- hosts can mount any 
  144. number of VOBs with the standard UNIX mount command (Figure 0-1).
  145.    Each version-controlled file in a VOB is called a file element; 
  146. its versions are organized into a version tree structure, with 
  147. branches and sub-branches (Figure 0-2). HP/ClearCase can version-
  148. control any type of file, not just ASCII text files.
  149.    Version trees store "old" versions of source files, enabling the 
  150. rebuilding and maintenance of "old" releases. Each (sub-)branch can 
  151. grow independently, so that multiple variants of a source file can be 
  152. developed concurrently.
  153.    Each directory in a VOB is a versioned object called a directory 
  154. element. A version of a directory element is essentially similar to a 
  155. standard UNIX directory -- it lists file elements, (sub)directory 
  156. elements, and links. Successive versions of a directory element 
  157. record changes to the organization of the source code base, rather 
  158. than changes to the contents of individual files. This includes 
  159. creation of new files, renaming of files, even wholesale source tree 
  160. reorganizations.
  161.    Although a VOB contains many versions of each file and directory, 
  162. most software "sees" the VOB as a standard UNIX directory tree. This 
  163. important feature is called transparency -- the version-control 
  164. system becomes invisible, or transparent. In each HP/ClearCase view, 
  165. a file element appears to be a ordinary file, and a directory element 
  166. appears to be an ordinary directory. This is accomplished by the 
  167. automatic selection of one version of each element. (A per-view 
  168. configuration file determines which version the view selects, as 
  169. described in the next section.)
  170.    Transparency is implemented at the UNIX fie system level by a 
  171. HP/ClearCase virtual file system extension. Standard I/O calls (for 
  172. example, read(2) and open(2)) are intercepted in the UNIX kernel; 
  173. HP/ClearCase's version-selection mechanism reroutes the destination 
  174. of the call from an element to a selected version of that element.
  175.    Transparency a key feature, because it enables HP/ClearCase to 
  176. work smoothly with UNIX system software, commercial applications, and 
  177. a user's in-house software tools. Users do not have to discard their 
  178. accustomed ways of working, or their existing tools.
  179.    Users can override transparency, using version-extended pathnames 
  180. to access any version of an element explicitly (Figure 0-3).
  181.    HP/ClearCase includes a set of commands for evolving elements. The 
  182. basic checkout-edit-checkin paradigm is similar to that used by 
  183. "traditional" UNIX version-control facilities, such as SCCS and RCS. 
  184. In addition to checkout and checkin, HP/ClearCase command set 
  185. includes delete version, create/delete branch, list version history 
  186. (chronological), list version history (structural), compare with 
  187. predecessor version, merge parallel versions, and many more.
  188.  
  189. Configuration Management -- Views
  190. Version control facilities manage many versions of each file system 
  191. element. In HP/ClearCase, this management extends beyond just source 
  192. code to every file system object type and the even the file system 
  193. directories themselves. However, software development tools, and the 
  194. people who use them, work on individual files - not on collections of 
  195. versions of files. At any one time, for any one project, each 
  196. developer decides which versions form the appropriate development 
  197. starting point, and works just with those. 
  198.    The primary goal of a software configuration management system is 
  199. to locate the desired information and present it in a usable form. In 
  200. conjunction with a version control system, this requires powerful, 
  201. flexible and intuitive version selection to help developers identify 
  202. the specific versions with which they need to work. Once the proper 
  203. versions are selected, they must be presented to the user in a 
  204. familiar way, and in a form readily usable by standard software 
  205. development tools.
  206.    Each developer requires a work environment that provides access to 
  207. the appropriate versions of source files, and which allows the 
  208. developer to work in a way that does interfere with (or suffer 
  209. interference from) other developers. The HP/ClearCase configuration 
  210. management mechanism, the view, provides both these services.
  211.    A view is a working context for an individual developer or a 
  212. closely-coordinated group. Views implement HP/ClearCase's transparent 
  213. access feature, described in the preceding section. A view makes a 
  214. VOB appear to be a standard directory tree by selecting (at most) one 
  215. version of each element (Figure 0-4). One view might select the most 
  216. recent version of every element; another view might select the 
  217. versions used to build Release 2.4.3; still another view might select 
  218. the versions being used to fix a bug in Release 3.0.1.
  219.    Each user can have many views, and can attach any window (that is, 
  220. any process) to any view.
  221.    The set of versions selected by a view is called its 
  222. configuration. View configurations are dynamic, and can be modified 
  223. by the developer at any time. A view's configuration is defined by a 
  224. short, powerful set of rules, called a configuration specification 
  225. (config spec). Each time a program performs an open(2) call on an 
  226. element, the UNIX kernel uses the view to which the current process 
  227. is attached. The view_server process for that view consults the rules 
  228. in its config spec, decides which version of the element to select, 
  229. and returns this information to the kernel.
  230.    Thus, a view is unlike a traditional "sandbox", which configures a 
  231. source tree by copying particular versions from a repository. A view 
  232. is not a set of files; rather, it is a way of "seeing" shared 
  233. elements. Each view can access any and all VOBs mounted on the 
  234. developer's host. When new versions or elements are added to a VOB, 
  235. or new VOBs are mounted, that data is immediately accessible to all 
  236. views. Developers can change their config spec rules interactively, 
  237. to balance the need for isolation from other views' source code 
  238. changes with the need to share such changes.
  239.    Typically, a view's configuration is defined in terms of wildcards 
  240. (filename patterns) and mnemonic names, not by naming specific 
  241. versions. For example, the user-defined version label "REL2.4.3" can 
  242. be attached to versions of many different source files; and a branch 
  243. with the user-defined branch name "fix2.4.3" can be created in some 
  244. or all those file elements. A config spec with just two rules creates 
  245. a view with this configuration:"for all source files, use the most 
  246. recent version on branch fix2.4.3, or else use the version labeled 
  247. REL2.4.3".
  248.    To facilitate rebuildability, a derived object can be used to 
  249. define a view's configuration directly, for example, "select the same 
  250. source versions that I used to build this executable last week".
  251.    Each developer can have several views, used for different tasks: 
  252. new development, fixing a bug in a recent release, preparing a 
  253. special variant for a valued customer, porting to a new window 
  254. system, and so on. In each such view, the developer must be able to 
  255. edit source files, compile the software, and test it. To enable such 
  256. work to proceed without disturbing the work going on in other views, 
  257. each view has its own storage area. This view-private storage is used 
  258. for working versions of source file elements, text-editor backup 
  259. files, cut-and-paste temporary files, and so on. A developer's builds 
  260. are also placed in view storage, so that they do not interfere with 
  261. others' builds. 
  262.    For example, two developers in different views might edit the same 
  263. source file and rebuild the same executable, without getting in each 
  264. others' way. (In fact, they might help each other by being in the 
  265. same place at the same time -- see the next section.)
  266.    HP/ClearCase views are designed to be "cheap" -- they can be 
  267. created quickly and easily, are easy to modify, and require minimal 
  268. system resources. For example, a minor variant of a 5000-file source 
  269. configuration might be required to create a customer-specific version 
  270. of a software system. The view in which this task will be performed 
  271. can be created in ten seconds, by editing a few version-selection 
  272. rules. The disk requirements for this view are small -- enough space 
  273. to store modified source files, corresponding object modules, and the 
  274. executable(s) to be built. Most sources and object modules need not 
  275. be copied or rebuilt. Unmodified sources are accessed from VOBs; 
  276. object modules corresponding to unmodified sources are reused from 
  277. other views.
  278.    Both views and VOBs are network-wide resources, accessible through 
  279. NFS services. This facilitates team-oriented development, and enables 
  280. data managed by HP/ClearCase to be used on hosts where HP/ClearCase 
  281. software has not been installed.
  282.  
  283. Edit/Compile/Debug Cycle
  284. HP/ClearCase is compatible with standard UNIX development tools and 
  285. practices. It is easy for organizations to make the transition to 
  286. HP/ClearCase usage; in particular, the transition can be incremental, 
  287. some groups making the switch before others. HP/ClearCase includes 
  288. tools for importing version-controlled files from other systems, such 
  289. as SCCS and RCS.
  290.    The following outline of the typical development cycle 
  291. demonstrates HP/ClearCase's compatibility, while highlighting its 
  292. "value-added" features.
  293. o To start working, a developer creates a shell process that is 
  294.   "attached" to a view, then uses the standard cd command to visit any 
  295.   source directory, in any VOB. There is no need to copy data to a 
  296.   "parallel source tree".
  297. o All of the developer's shell-oriented tools (aliases, filename 
  298.   completion, command-output substitution, scripts, and so on) remain 
  299.   available as the developer works on HP/ClearCase data.
  300. o The developer cannot modify a source file element until it is 
  301.   "checked out". An element appears as a read-only file until the 
  302.   developer issues a checkout command to make it writable. Only the 
  303.   developer (and other users using the same view) can access the 
  304.   writable, checked-out version.
  305. o The developer can build the software system with the standard 
  306.   make(1) utility, with HP/ClearCase's enhanced clearmake build 
  307.   utility, or with any other UNIX facilities (for example, shell 
  308.   scripts).
  309. o clearmake is compatible with standard make, but offers a powerful 
  310.   set of additional features:
  311.   - Build Auditing. For each build script it executes, clearmake 
  312.     stores a configuration record (config rec) that details the build 
  313.     process. The config rec includes "who, what, when, where" 
  314.     information, along with a list of exact source file versions used, 
  315.     a copy of the build script used, and any build options specified on
  316.     the command line or in the environment.
  317.        HP/ClearCase automatically associates the config rec with each 
  318.     object produced by the build script (for example, an object module 
  319.     and a compiler listing file). These derived objects are 
  320.     automatically  tracked by HP/ClearCase.
  321.   - Derived Object Sharing. Instead of invoking a build script to 
  322.     create a target, clearmake can instead find an appropriate derived 
  323.     object that was built in another view. It creates (in essence) an 
  324.     additional hard link to the derived object, causing it to be shared 
  325.     by the views. This capability saves both disk storage and build 
  326.     time.
  327.   - Parallel, Distributed Builds. When build dependencies allow, 
  328.     clearmake executes multiple build scripts in parallel. The parallel 
  329.     executions can take place on a single multi-processor host and/or on 
  330.     several hosts throughout the local network.
  331. o The developer can use any debugger (for example, dbx(1) or a 
  332.   vendor-supplied tool) to analyze and fix bugs in built software. The 
  333.   correct source file versions are all accessible through the view.
  334. o The checkin command creates a new version of an element. The new 
  335.   version instantly becomes available to all views, and visible in 
  336.   views that have been configured to "see" the latest version of that 
  337.   element.
  338. o Developers can monitor and compare each others' edits and builds 
  339.   with special HP/ClearCase commands: list checkouts, list derived 
  340.   objects, list/compare config recs, compare source versions, and so 
  341.   on.
  342.  
  343. Process Management / Policy Enforcement
  344. In addition to providing tools that control sources and derived 
  345. objects, HP/ClearCase provides tools for monitoring and controlling 
  346. the development process itself. These tools rely on HP/ClearCase 
  347. meta-data, information that pertains to, but is separate from, the 
  348. actual contents of files and directories. The preceding section 
  349. introduced two kinds of meta-data: version labels and branch names. 
  350. Additional kinds support the definition and enforcement of process 
  351. management policies that go beyond standard UNIX access controls.
  352. o Attributes. An attribute is a name=value pair, similar in form to 
  353.   an environment variable. A generalization of version labels, 
  354.   attributes can be assigned to a wide variety of objects (for example, 
  355.   derived objects), not just versions of elements; and they can have 
  356.   strongly-typed values, such as integers in specified ranges.
  357. o Hyperlinks. A hyperlink is a logical "arrow" (one-headed or two-
  358.   headed) that connects two VOB objects. Either end of the "arrow" can 
  359.   be annotated with a text string.
  360. o Triggers. A trigger is a "flag" that monitors the development 
  361.   process, and automatically responds to various commands executed by 
  362.   developers. A trigger can disallow certain commands from being 
  363.   executed.
  364.    HP/ClearCase does not attempt to dictate any particular process 
  365. management policies or procedures. Rather, it supplies these meta-
  366. data facilities as a flexible, powerful "toolset". Administrators can 
  367. use these tools to automate the enforcement the organization's 
  368. existing policies.
  369.    At the simplest level, triggers enable automation of vital 
  370. communications links among members of the development team (Figure 0-
  371. 5).
  372.    At a more advanced level, triggers are the enforcement mechanism 
  373. required for a comprehensive and robust process management system. A 
  374. trigger can interrupt the action that triggered it (for example, a 
  375. checkin command), to determine whether the action conforms to the 
  376. organization's development policies. If the action is not valid, the 
  377. trigger might cancel the action; the response to a valid action might 
  378. be to attach a version label or attribute to the relevant files.
  379.    For example, the QA Department might be mandated to analyze the 
  380. degree to which each source module complies with company coding 
  381. standards. In a partially automated system, every checkin of a source 
  382. file might trigger sending of mail to a QA engineer. The QA engineer 
  383. might then determine the compliance level and assign attribute 
  384. CodeLevel to that source file version, with the value "not 
  385. compliant", "minimally compliant", or "optimally compliant".
  386.    In a more fully automated system, a checkin command might trigger 
  387. the automatic running of a compliance script. Such a trigger could 
  388. attach the CodeLevel attribute to the checked-in version, or cancel 
  389. the checkin command if the code is not compliant.
  390.    Hyperlinks allow interrelationships among different aspects of a 
  391. project to be defined, tracked, and controlled. For example, 
  392. "requirements tracing" for a particular proposal might be implemented 
  393. with a set of hyperlinks, all of which connect the proposal document 
  394. to associated design notes and source files. Each hyperlink from the 
  395. proposal document might be annotated with a reference to the specific 
  396. section to which the design note and source file corresponds (Figure 
  397. 0-6).
  398.  
  399. Release Management
  400. Source control relates to the files that go into software builds; 
  401. release management relates to the files that are produced by builds, 
  402. and are subsequently placed on release tapes (or other release 
  403. media).
  404.    During development, many versions of derived objects are produced. 
  405. Most of these have a short lifetime -- developers continually revise 
  406. sources and rebuild. Eventually, a "good" build is deemed ready for 
  407. release (by the developer, a manager, the QA Department, and so on). 
  408. At this point, a derived object can be "released" to a more permanent 
  409. status by checking it in as a version of an element. It can then be 
  410. treated like a source file.
  411.    As with process management, HP/ClearCase does not dictate a 
  412. particular mechanism for defining and producing product releases. But 
  413. HP/ClearCase's ability to version-control any kind of file makes it 
  414. easy to apply source control techniques to the challenge of release 
  415. management.
  416.    The Release Engineering group might maintain one or more "release 
  417. tree" VOBs. The directory structure of the tree(s) mirrors the 
  418. hierarchy of files to be created on the release medium. (Since a 
  419. release tree involves directory elements, it is easy to change its 
  420. structure from release to release.)
  421.    A release tree might be used to organize Release 2.4.3 as follows:
  422. o When an executable or other file is ready to be released, a release 
  423.   engineer checks it in as a version of an element in the release tree.
  424. o An appropriate version label (for example, REL2.4.3) is attached to 
  425.   that version, either manually by the engineer or automatically with a 
  426.   trigger.
  427. o When all files to shipped have been released in this way, a release 
  428.   engineer configures a view to select only versions with that label. 
  429.   As seen through this view, the release tree contains exactly the set 
  430. of files to be released.
  431. o To cut a release tape, the engineer issues a simple tar(1) or 
  432.   cpio(1) command to copy the appropriately-configured release 
  433.   tree.fooc.@@/main/bugs/bug404/
  434.  
  435. UNIX is a registered trademark of UNIX System Laboratories, Inc. in 
  436. the USA and other countries.OSF/Motif is a trademark of the Open 
  437. Software FoundationClearCase is a trademark of Atria Software, Inc.
  438.  
  439. Copyright (C) Hewlett-Packard Company, 1992
  440. Printed in USA 920601
  441.  
  442. HP/ClearCase White Paper
  443.  
  444. Associated Files: none
  445.